﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <script src="/js/header.js"></script>
    <script src="/lib/date/wdatepicker.js"></script>
</head>
<body>
    <div class="data-wrap case">
        <div class="data-tool clearfix">
            <div class="pull-left form-inline ">
            </div>
            <div class="pull-right">
                <form class="form-inline" id="formSearch">

                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">公司名称：</label>
                        <input class="form-control" name="companyName" type="text" autocomplete="off">
                    </div>
                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">银行卡号：</label>
                        <input class="form-control" name="cardNumber" type="text" autocomplete="off">
                    </div>
                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">银行卡用户名：</label>
                        <input class="form-control" name="cardName" type="text" autocomplete="off">
                    </div>
                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">新增时间：</label>
                        <input id="d421" class="Wdate wd125" name="startTime" type="text" onfocus="WdatePicker({maxDate:'%y-%M-%d'})" autocomplete="off"/>
                    </div>
                    <button type="button" class="btn btn-default btn-sm active" id="btnSearch"><span class="glyphicon glyphicon-search"></span> 搜索</button>
                </form>
            </div>
        </div>

        <!--一高级搜索开始-->
        <div class="AdvSearch">
            <div class="AdvSearchcom collapse">
                <table>
                    <tbody>
                        <tr>
                            <td>付款姓名：</td>
                            <td><input type="text" class="form-control" value=""></td>
                            <td>通知 ：</td>
                            <td><input type="text" class="form-control" value=""></td>
                        </tr>
                        <tr>
                            <td>退款流水：</td>
                            <td><input type="text" class="form-control" disabled value=""></td>
                            <td>退款人：</td>
                            <td><input type="text" class="form-control" value=""></td>
                        </tr>
                        <tr>
                            <td>退款金额：</td>
                            <td><input type="text" class="form-control" value=""></td>
                        </tr>
                    </tbody>
                </table>
                <div class="AdvSearchfooter t_c">
                    <button id="search" class="btn btn-default btn-sm" type="button">立即搜索</button>
                    <button id="cancel" data-dismiss="modal" class="btn btn-default btn-sm" type="button">取消</button>
                </div>
            </div>
        </div>
        <!--高级搜索结束-->
        <div class="paging">
        </div>
    </div>

    <script type="text/x-dot-template" id="pgerTemplate">
        <div class="data-body data-scroll">
            <div class="data-view">
                <div class="data-div-view table-responsive">
                    <table class="table table-hover table-striped table-bordered">
                        <thead>
                            <tr>
                                <th class="t_l wd150">公司名称</th>
                                <th class="t_l wd125">银行名称</th>
                                <th class="t_l wd150">银行卡号</th>
                                <th class="t_l wd100">用户名</th>

                                <th class="t_r wd100">金额</th>
                                <th class="t_r wd100">余额变化前</th>
                                <th class="t_r wd100">余额变化后</th>

                                <th class="t_l wd100">新增者</th>
                                <th class="t_c wd75">类别</th>
                                <th class="t_c wd150">新增时间</th>
                                <th class="t_l wd150">订单号</th>
                                <th class="t_l">新增说明</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{? it.tData && it.tData.length>0}}
                            {{~it.tData :item:index}}
                            <tr>
                                <td class="t_l wd150" title="{{= item.companyNameEn }}">{{?  item.companyName}}{{= item.companyName }}{{??}}{{?}}</td>
                                <td class="t_l wd125">{{= item.bankName }}</td>
                                <td class="t_l wd150" title="{{= FlashPay.Util.SubCardNumber(item.cardNumber) }}">{{= FlashPay.Util.SubCardNumber(item.cardNumber) }}</td>
                                <td class="t_l bold wd100">{{= item.cardName }}</td>

                                <td class="t_r bold wd100">{{= item.amount }}</td>
                                <td class="t_r bold wd100">{{= item.beforeBalance }}</td>
                                <td class="t_r bold wd100">{{= item.afterBalance }}</td>

                                <td class="t_l wd100">{{?  item.createName}}{{= item.createName }}{{??}}{{?}}</td>
                                <td class="t_c wd75">{{= FlashPay.Util.GetAdjustStatusValue(item.adjustStatus) }}</td>
                                <td class="t_c wd150">{{= FlashPay.Util.FormatDate(item.createDBDate) }}</td>
                                <td class="t_l wd150">{{? item.orderNo==null }}{{?? }}{{= item.orderNo }}{{? }}</td>
                                <td class="t_l">{{?  item.createRemark}}{{= item.createRemark }}{{??}}{{?}}</td>
                            </tr>
                            {{~}}
                            {{??}}
                            <tr class="noRecord">
                                <td colspan="12">暂无记录！</td>
                            </tr>
                            {{?}}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <!-- 必要的分页参数设置 -->
        <input type="hidden" id="TotalCount" value="{{=it.totalCount}}" />
    </script>
    <script type="text/javascript">

        $(function () {
            $("input[name='startTime']").val(FlashPay.Util.GetDateStr(0));

            FlashPay.UI.DataAutoHeight();

            FlashPay.UI.Triggerbox({
                btnAdvSearch: '#AdvSearch',
                searchCallBack: function () {
                    console.info(1);
                },
                cancelCallBack: function () {

                }
            });

            $("#btnSearch").click(function () {
                FlashPay.UI.DoSearch();
            });

            FlashPay.UI.DoSearch();
            
        });

        $(document).keyup(function (event) {
            var keycode = event.which;
            if (keycode == 13) {
                FlashPay.UI.DoSearch();
            }
        });

        function Tip_success(word) {
            FlashPay.UI.Tip_success(word);
        }

        function doSearch() {
            FlashPay.UI.Pager(".paging", { templateId: "pgerTemplate", pageSize: 15, ajax: { url: '/Payment/PaymentAdjustBalance?adjustStatus=2' } });
        }

    </script>
</body>
</html>